/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package renderedClases;

import java.awt.Component;
import javax.swing.DefaultListCellRenderer;
import javax.swing.JList;
import persistencia.Cobros;

/**
 *
 * @author hellwolf
 */
public class CobrosRendered extends DefaultListCellRenderer{
    
  
    @Override
    public Component getListCellRendererComponent(
            JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
        super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
        setText("");
        if (value instanceof Cobros) {
            Cobros i = (Cobros) value;
            setText(String.valueOf(i.getId()));
        }
        return this;
    }
}
